<%@ page contentType="text/html;charset=UTF-8"  pageEncoding="utf-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>index</title>
    <link rel="stylesheet" href="/css/bootstrap.css" type="text/css"/>
</head>
<body>
    <script type="text/javascript" src="/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <div>
        <a href="/resume/toAdd">
            <button type="button" class="btn btn-primary btn-xs">添加</button>
        </a>
        <a href="/logout">
            <button type="button" class="btn btn-primary btn-xs">退出登录</button>
        </a>
        <table class="table table-striped">
            <tr>
                <th>姓名</th>
                <th>地址</th>
                <th>电话</th>
                <th>操作</th>
            </tr>
            <c:forEach var="resume" items="${resumes}">
                <input type = "hidden" id="id" name= "id"value="${id}">
                <tr>
                    <td>${resume.name}</td>
                    <td>${resume.address}</td>
                    <td>${resume.phone}</td>
                    <td>
                        <a href="/resume/toAdd?name=${resume.name}&address=${resume.address}&phone=${resume.phone}&id=${resume.id}">
                            <button type="button" class="btn btn-primary btn-xs">编辑</button>
                        </a>
                        <a href="/resume/delete?id=${resume.id}">
                            <button type="button" class="btn btn-primary btn-xs">删除</button>
                        </a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>

</body>
</html>
